//
//  MPlusMessageTableViewCell.m
//  medicineplus
//
//  Created by gufei on 15-5-18.
//  Copyright (c) 2015年 chn_ruby@126.cn. All rights reserved.
//

#import "MPlusMessageTableViewCell.h"
#import "MPlusDefine.h"

#define IMAGE_HEIGHT 50
#define IMAGE_WIDTH 50
#define CELL_HEIGHT 72

@implementation MPlusMessageTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        _aImage = [[UIImageView alloc] initWithFrame:CGRectMake(PADDING_10, PADDING_10, IMAGE_WIDTH, IMAGE_HEIGHT)];
        [self addSubview:_aImage];
        
        _aTitle = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10*2+IMAGE_WIDTH, PADDING_10, (SCREEN_WIDTH-PADDING_10*4-IMAGE_WIDTH)/3*2, LABEL_HEIGHT_22)];
        _aTitle.font = [UIFont systemFontOfSize:[kFontSize16 floatValue]];
        [self addSubview:_aTitle];
        
        _aTimes = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10*3+IMAGE_WIDTH+(SCREEN_WIDTH-PADDING_10*4-IMAGE_WIDTH)/3*2, PADDING_10, (SCREEN_WIDTH-PADDING_10*4-IMAGE_WIDTH)/3, LABEL_HEIGHT_22)];
        _aTimes.font = [UIFont systemFontOfSize:[kFontSize14 floatValue]];
        _aTimes.textColor = [UIColor lightGrayColor];
        _aTimes.textAlignment = NSTextAlignmentRight;
        [self addSubview:_aTimes];
        
        _aIntro = [[UILabel alloc] initWithFrame:CGRectMake(PADDING_10*2+IMAGE_WIDTH, PADDING_10*2+LABEL_HEIGHT_22, SCREEN_WIDTH-PADDING_10*3-IMAGE_WIDTH, LABEL_HEIGHT_20*2)];
        _aIntro.lineBreakMode = NSLineBreakByWordWrapping;
        _aIntro.numberOfLines = 0;
        _aIntro.font = [UIFont systemFontOfSize:[kFontSize14 floatValue]];
        _aIntro.textColor = [UIColor lightGrayColor];
        [self addSubview:_aIntro];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
